package com.yuan.spring.mongo;

import java.util.List;

/**
 * Created by yeg on 2017/8/18.
 */
public interface MongoService {

    /**
     * 单条插入
     */
    <T extends BaseMongoEntity> void insert(T t);

    /**
     * 批量插入
     */
    <T extends BaseMongoEntity> void insert(List<T> list);

    /**
     * 条件查询 where key = value
     */
    <T extends BaseMongoEntity> List<T> find(Class<T> t, MongoParam mongoParam);

    /**
     * 查询所有
     */
    <T extends BaseMongoEntity> List<T> find(Class<T> t);

}
